// 此文件用来配置axios的具体请求?


// 引入axios实例

import http from '../utils/request'

// 获取登录验证码
export let getCaptcha = () => http.get('/users/getCaptcha?v=next')
// export let getCaptcha = () => http.get('/users/getCaptcha',{
//     params:{
//         v:'next'
//     }
// })




// 校验验证码
export let verifyCaptcha = captcha => http.get('/users/verifyCaptcha',{
    params:{
        captcha
    }
})




// 用户名登入
export  let userNameLogin = (username,password) => http.post('/users/login',{
    username,
    password
})


// 获取二维码地址
export let getQrCode = sid => http.get('/users/getQrcode',{
    params:{
        sid
    }
})




// 微信登入
export let wechatLogin = wechatCode => http.get('/users/wechatLogin',{
    params:{
        wechatCode
    }
})

//  获取验证码
export let getmesCodeApi = phoneNumber => http.post('/sms/send',{
    phoneNumber
})


// 校验验证码
export let verifyPhoneCaptcha = code => http.post('/users/login?type=sms',{
        code
})